/**
 * 
 */
package com.firebird.oms.service.sm.impl;

import java.util.List;
import java.util.Map;

import com.firebird.base.domain.Page;
import com.firebird.oms.dao.sm.TismStaticTypeDao;
import com.firebird.oms.dao.sm.TismStaticValueDao;
import com.firebird.oms.domain.sm.TismStaticType;
import com.firebird.oms.domain.sm.TismStaticValue;
import com.firebird.oms.service.sm.StaticService;

/**
 * @author qiuxj
 * @date 2009-12-4
 *
 */
public class StaticServiceImpl implements StaticService {
	
	private TismStaticTypeDao smStaticTypeDao;
	private TismStaticValueDao smStaticValueDao;
	
	/* (non-Javadoc)
	 * @see com.firebird.oms.service.sm.impl.StaticService#createStaticType(com.firebird.oms.domain.sm.TismStaticType)
	 */
	public void createStaticType(TismStaticType smStaticType) {
		smStaticTypeDao.create(smStaticType);
	}
	
	/* (non-Javadoc)
	 * @see com.firebird.oms.service.sm.impl.StaticService#getStaticType(java.lang.Integer)
	 */
	public TismStaticType getStaticType(Integer staticTypeId) {
		return smStaticTypeDao.get(staticTypeId);
	}
	
	/* (non-Javadoc)
	 * @see com.firebird.oms.service.sm.impl.StaticService#updateStaticType(com.firebird.oms.domain.sm.TismStaticType)
	 */
	public void updateStaticType(TismStaticType smStaticType) {
		smStaticTypeDao.update(smStaticType);
	}
	
	/* (non-Javadoc)
	 * @see com.firebird.oms.service.sm.impl.StaticService#findStaticType(java.util.Map)
	 */
	public List<TismStaticType> findStaticType(Map<String, String> filter) {
		return smStaticTypeDao.find(filter);
	}
	
	/* (non-Javadoc)
	 * @see com.firebird.oms.service.sm.impl.StaticService#pageStaticType(java.util.Map, java.util.Map, java.util.Map, int, int)
	 */
	public Page pageStaticType(Map<String, String> filter, Map<String, String> like, Map<String, String> sort,
			int pageNo, int pageSize) {
		return smStaticTypeDao.pagedQuery(filter, like, sort, pageNo, pageSize);
	}
	
	/* (non-Javadoc)
	 * @see com.firebird.oms.service.sm.impl.StaticService#createStaticValue(com.firebird.oms.domain.sm.TismStaticValue)
	 */
	public void createStaticValue(TismStaticValue smStaticValue) {
		smStaticValueDao.create(smStaticValue);
	}
	
	/* (non-Javadoc)
	 * @see com.firebird.oms.service.sm.impl.StaticService#getStaticValue(java.lang.Integer)
	 */
	public TismStaticValue getStaticValue(Integer id) {
		return smStaticValueDao.get(id);
	}
	
	/* (non-Javadoc)
	 * @see com.firebird.oms.service.sm.impl.StaticService#updateStaticValue(com.firebird.oms.domain.sm.TismStaticValue)
	 */
	public void updateStaticValue(TismStaticValue smStaticValue) {
		smStaticValueDao.update(smStaticValue);
	}
	
	/* (non-Javadoc)
	 * @see com.firebird.oms.service.sm.impl.StaticService#findStaticValue(java.util.Map)
	 */
	public List<TismStaticValue> findStaticValue(Map<String, String> filter) {
		return smStaticValueDao.find(filter);
	}
	
	/* (non-Javadoc)
	 * @see com.firebird.oms.service.sm.impl.StaticService#pageStaticValue(java.util.Map, java.util.Map, java.util.Map, int, int)
	 */
	public Page pageStaticValue(Map<String, String> filter, Map<String, String> like, Map<String, String> sort,
			int pageNo, int pageSize) {
		return smStaticValueDao.pagedQuery(filter, like, sort, pageNo, pageSize);
	}
	
	public void setSmStaticTypeDao(TismStaticTypeDao smStaticTypeDao) {
		this.smStaticTypeDao = smStaticTypeDao;
	}
	public void setSmStaticValueDao(TismStaticValueDao smStaticValueDao) {
		this.smStaticValueDao = smStaticValueDao;
	}

}
